package com.fishery.base.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fishery.base.entity.PondFeeding;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fishery.base.entity.vo.FeedingRecordVo;

import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * 池塘喂养服务类
 * </p>
 *
 * @author Ghost
 * @since 2021-01-15
 */
public interface PondFeedingService extends IService<PondFeeding> {

	/**
	 * 分页获取基地的喂养信息
	 *
	 * @param baseId
	 * @param current
	 * @param size
	 * @return
	 */
	Page<FeedingRecordVo> pageBaseFeedingRecords(String baseId, int current, int size);

	/**
	 * 分页获取某个池塘的喂养信息
	 *
	 * @param pondId
	 * @param current
	 * @param size
	 * @return
	 */
	Page<FeedingRecordVo> pagePondFeedingRecords(String pondId, int current, int size);

	/**
	 * 喂养
	 *
	 * @param pondFeeding
	 * @return
	 */
	boolean feeding(PondFeeding pondFeeding);

	/**
	 * 修改喂养记录
	 *
	 * @param pondFeeding
	 * @return
	 */
	boolean updateFeedingRecord(PondFeeding pondFeeding);

	/**
	 * 以Excel文件格式导出基地喂养记录
	 *
	 * @param response
	 * @param baseId
	 */
	void getFeedingRecordsByExcel(HttpServletResponse response, String baseId);

	/**
	 * 分页获取某个池塘当前此次养殖的喂养信息
	 *
	 * @param farmingId
	 * @param current
	 * @param size
	 * @return
	 */
	Page<FeedingRecordVo> pageFeedingRecordsOfCurrentFarming(String farmingId, int current, int size);

	/**
	 * 通过farmingId分页获取喂养记录（及时已经是被删除了）
	 *
	 * @param farmingId
	 * @param current
	 * @param size
	 * @param catchTime
	 * @return
	 */
	Page<FeedingRecordVo> traceFeedingByFarmingId(String farmingId, int current, int size,String catchTime);
}

